import os
import sys
sys.path.append('../../')
from DataProcessing.tools.HdfsTools import HdfsTools

# !/usr/lib/python
# encoding:utf-8


if __name__ == '__main__':
    base_cmd = "python HourBehavior.py -r hadoop"

    output_path = "-o hdfs://localhost:9000/output/HourBehavior/"

    data_path = "hdfs://localhost:9000/data_clean/time_convert/UB.csv"

    run_cmd = base_cmd + " " + output_path + " " + data_path

    os.system(run_cmd)

    ht = HdfsTools()
    ht.rename('/output/HourBehavior/part-00000', '/output/HourBehavior/HourBehavior.txt')
